{js:my97date}
<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li>
			<i class="home-icon fa fa-home"></i>
			<a href="#">营销</a>
		</li>
		<li>
			<a href="#">优惠券管理</a>
		</li>
		<li class="active">编辑优惠券</li>
	</ul>
</div>
<div class="content">
	<form action="{url:/market/ticket_edit_act}" name='ticket_edit'  method="post">
		<input type='hidden' name='id' />
		<table class="table form-table">
			<colgroup>
				<col width="130px" />
				<col />
			</colgroup>

			<tr>
				<th>优惠券名称：</th>
				<td>
					<input type='text' name='name' class='form-control' pattern='required' placeholder='请填写优惠券名称' />
				</td>
			</tr>
			<tr>
				<th>优惠券面额：</th>
				<td>
					<input type='text' class='form-control' pattern='float' placeholder='必须填写数字' name='value' />
					<p class="help-block">* 请填写此组优惠券所能抵销的金额</p>
				</td>
			</tr>
			<tr>
				<th>有效时间段：</th>
				<td>
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                                <input class="form-control" type="text" name="start_time" onfocus="WdatePicker()" value="" placeholder="起始日期" />
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                                <input class="form-control" type="text" name="end_time" onfocus="WdatePicker()" value="" placeholder="结束日期" />
                            </div>
                        </div>
                    </div>
					<p class="help-block">* 此组优惠券的使用时间段</p>
				</td>
			</tr>
			<tr>
				<th>兑换所需积分：</th>
				<td>
					<input type='text' class='form-control' pattern='int' empty placeholder='留空或者填写数字' name='point' />
					<p class="help-block">设置兑换此优惠券所需要的用户积分，如果为空或0则表示此优惠券不支持积分兑换，只支持管理员动手生成</p>
				</td>
			</tr>
			<tr><td></td><td><button class='btn btn-primary' type='submit'>确定</button></td></tr>
		</table>
	</form>
</div>

<script type='text/javascript'>
//表单回填
var formObj = new Form('ticket_edit');
formObj.init({echo:JSON::encode($this->ticketRow)});

//当修改操作时禁止修改金额
if($('[name="id"]').val())
{
	$('[name="value"]').attr('disabled','disabled');
}
</script>